import { mock } from 'mockjs'
import { isDev } from 'common/config'

const mockArr = require.context('.', false, /\.(ts|js)$/)
const keys = isDev ? mockArr.keys().filter(key => key !== './index.ts').map(key => mockArr(key).default) : []
keys.forEach(config => {
    if (!Array.isArray(config)) config = [config]
    config.forEach(({ url, method, render }) => mock(url, method, render));
})





